const state = {
    pId: null,
    dId: null,
    nowDsid: null,
    nowIndex: null,
    backStatus: null,
    doctorBackStatus: null,
    doctorItem: null,
    hospitalItem: null
}

const mutations = {
    SAVE_PID: (state, num) => {
        state.pId = num;
    },
    SAVE_DID: (state, num) => {
        state.dId = num;
    },
    CLEAR_ID: (state) => {
        state.pId = null;
        state.dId = null;
    },
    SAVE_NOW: (state, data) => {
        state.nowDsid = data.dsid;
        state.nowIndex = data.nindex;
    },
    SET_BACK_STATUS: (state, num) => {
        state.backStatus = num
    },
    SET_DOCTOR_BACK_STATUS: (state, num) => {
        state.doctorBackStatus = num
    },
    SET_DOCTOR_ITEM_STATUS: (state, item) => {
        state.doctorItem = item
    },
    SET_HOSPITAL: (state, item) => {
        state.hospitalItem = item
    }
}

const actions = {}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}